#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include "MyAnimation.h"

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

protected:
    void paintEvent(QPaintEvent *event) override;
    void resizeEvent(QResizeEvent *event) override;
    void keyPressEvent(QKeyEvent *event) override;
private:
    MyAnimation anima;
    QRect &ground;
    QRect &column1;
    QRect &column2;
    Ball &ball;

    void updateWall();

};
#endif // WIDGET_H
